home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / CON-03A.ZIP / MMENU.PAS < prev    next >
Pascal/Delphi Source File  |  1995-11-16  |  3KB  |  134 lines

  1. (* Conspiracy Software Version 0.2α (c)1995 Grooven Designs       *)
  2. (* Coded by Paul Maggs (fLiCk) / Grooven Designs                  *)
  3.  
  4. (* Conspiracy Menu CMDS unit *)
  5.  
  6. unit mmenu;
  7.  
  8. interface
  9.  
  10. procedure main_menu;
  11.  
  12. implementation
  13.  
  14. uses crt,
  15.      dos,
  16.      funct,
  17.      comms,
  18.      msgbase,
  19.      pager,
  20.      list;
  21.  
  22. type
  23.   userrecord = record
  24.     handle             : string[30];
  25.     location           : string[30];
  26.     realname           : string[30];
  27.     password           : string[15];
  28.     voicephone         : string[30];
  29.     dataphone          : string[30];
  30.     lines              : byte;
  31.     computer           : string[30];
  32. end;
  33.  
  34. const
  35.   prompt ='([$] conspiracy [$] - menu commands) : ';
  36.  
  37. procedure main_menu;
  38. var
  39.   f                     : file of userrecord;
  40.   user                  : userrecord;
  41.   ch                    : char;
  42.   bob_drinks_all_brew   : boolean;
  43.  
  44. begin
  45.     clrscr;
  46.     write(prompt);
  47.     repeat
  48.     bob_drinks_all_brew := false;
  49.     ch := readkey;
  50.      if (ch = 'B') or (ch = 'b') then
  51.            begin
  52.              init_bbs_list;
  53.              menu;
  54.            end;
  55.      if (ch = 'O') or (ch = 'o') then
  56.            begin
  57.              run_pager;
  58.            end;
  59.      if (ch = 'M') or (ch = 'm') then
  60.            begin
  61.              {message_menu;}
  62.            end;
  63.      if (ch = 'R') or (ch = 'r') then
  64.            begin
  65.              read_message;
  66.            end;
  67.      if (ch = 'E') or (ch = 'e') then
  68.            begin
  69.              enter_message
  70.            end;
  71.      if (ch = 'G') or (ch = 'g') then
  72.            begin
  73.              send_ansi('goodbye.ans');
  74.              halt;
  75.            end;
  76.      if (ch = '?') then
  77.            begin
  78.              send_ansi('mainm.ans');
  79.              write(prompt);
  80.            end;
  81.      if (ch = 'i') or (ch = 'I') then
  82.            begin
  83.              writeln('Okay, '+user.handle+', please enter your desired password: ');
  84.              send_ansi('welcome.ans');
  85.              writeln('press and key to continue');
  86.              repeat until keypressed;
  87.            end;
  88. {     if (ch = 'v') or (ch = 'V') then
  89.            begin
  90.               writeln('Conspiracy User Statistics');
  91.               writeln('Handle :'+user.handle+);
  92. }
  93.      if (ch = #13) then
  94.            begin
  95.              writeln;
  96.              write(prompt);
  97.             {write('([$] conspiracy [$] - menu commands) : ');}
  98.            end;
  99.      until bob_drinks_all_brew;
  100. end;
  101. end.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. (*  send_ansi('welcome.ans');
  113.   repeat
  114.      case ch of
  115.        'L': begin
  116.              writeln('GEEK');
  117.              {list_users;}
  118.             end;
  119.        'F' : begin
  120.                {file_list;}
  121.              end;
  122.        '?': begin
  123.               send_ansi('menucmd.ans');
  124.             end;
  125.        'I' : begin
  126.                send_ansi('info.ans');
  127.              end;
  128.        'G' : begin
  129.                halt;
  130.              end;
  131.      until bob_drinks_all_brew;
  132. end;
  133.  
  134. *)